<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<head>
<title>差错列表</title>
<link rel="stylesheet"
	href="<s:url value="/common/css/ui-lightness/ui.datepicker.css"/>"
	type="text/css" />
<script type="text/javascript"
	src="<s:url value="/common/script/ui.datepicker.js"/>"></script>
<script type="text/javascript"
	src="<s:url value="/common/script/ui.datepicker-fr.js"/>"></script>
<script type="text/javascript">
function checkDelet(id){
	if(BaseJs.confirm('确定要删除吗？')){
		var url ='broadcastError/EditBroadcastError!delete' + '?broadcastError.id=' + id;
		$.urlAjax(url,function(){
			$('#pt' + id).remove();
		});
	}
}
</script>
</head>
<body>
<h2 class="title">输入查询条件</h2>
<s:form id="search" action="broadcastError/SearchBroadcastError!search">
	<table class="form">
		<tr>
			<th width="20%">错误类型：</th>
			<td width="30%"><m:select enumType="broadcastError.errorType"
				name="broadcastError.errorType" headKey="--请选择--" headValue="" /></td>
			<th width="20%">人员：</th>
			<td width="30%"><m:dropUser name="broadcastError.user.id"
				cssClass="rule[required]" /></td>
		</tr>
		<tr>
			<th>开始时间：</th>
			<td><m:date name="beginDate" maxDate="0" /></td>
			<th>结束时间：</th>
			<td><m:date name="endDate" maxDate="0" /></td>
		</tr>
	</table>
	<div class="btnGroup"><input type="submit" value="查询" /></div>
</s:form>
<s:if test="bcErrorPages!=null">
	<h3>差错列表(共有<s:property value="bcErrorPages.totalCount" />条记录)</h3>
	<table class="list">
		<thead>
			<tr>
				<th width="10%">错误类型</th>
				<th width="10%">人员</th>
				<th width="10%">发生时间</th>
				<th width="40%">描述</th>
				<th width="10%">记录人员</th>
				<th width="10%">创建时间</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="bcErrorPages.items">
				<tr id="pt${id }">
					<td><m:property value="errorType" /></td>
					<td><s:property value="user.name" /></td>
					<td><s:date name="date" format="yyyy-MM-dd" /></td>
					<td><s:property value="detail" /></td>
					<td><s:property value="recorder.name" /></td>
					<td><s:date name="recordTime" format="yyyy-MM-dd" /></td>
					<td><!-- 加权限控制 --> <m:imgA img="edit" msg="修改"
						action="broadcastError/EditBroadcastError!toEdit?broadcastError.id=${id}" />
					<m:imgA img="delete" msg="删除" onclick="checkDelet(${id})" /></td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<m:page value="${bcErrorPages}" />
</s:if>
</body>